package com.dzm.xgb.core.controller.admin;


import com.dzm.common.result.R;
import com.dzm.xgb.core.pojo.entity.LendReturn;
import com.dzm.xgb.core.service.LendReturnService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 还款记录表 前端控制器
 * </p>
 *
 * @author Dzm
 * @since 2024-08-27
 */
@RestController
@RequestMapping("/admin/core/lendReturn")
public class AdminLendReturnController {

    @Autowired
    private LendReturnService lendReturnService;

    @GetMapping("/getLendReturnList/{id}")
    public R getLendReturnList(@PathVariable("id") Long id) {
        List<LendReturn> lendReturnList = lendReturnService.getListByLendId(id);

        return R.ok().data("list", lendReturnList);
    }
}

